package com.ticket.sass.admin.dto.output.film;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ticket.sass.admin.model.KeyInfoModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

/**
 * @author ywb
 * @date 2024-03-13 15:43
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("在售影片")
public class SaleFilmListOutput {
    @ApiModelProperty(value = "影片ID")
    private Long filmId;
   
    @ApiModelProperty(value = "影片名")
    private String filmName;

    @JsonIgnore
    @ApiModelProperty(value = "影片封面")
    private String filmCover;
    
    @ApiModelProperty(value = "影片封面")
    private KeyInfoModel cover;
    
    @ApiModelProperty(value = "影片编码")
    private String filmCode;
    
    @ApiModelProperty(value = "销售票数")
    private Integer saleTicketNum;
    
    @ApiModelProperty(value = "销售票房")
    private BigDecimal saleTicketAmount;
    
    @ApiModelProperty("排序")
    private Integer sort;
    
    public KeyInfoModel getCover() {
        return new KeyInfoModel(filmCover);
    }
}
